package org.example;

public class StaticInitial {

    private static int anInt = 1;

    static {
        System.out.println("anInt = " + anInt);
        // System.out.println("aChar = " + aChar); // 编译错误：java: illegal forward reference
        aChar = 'x'; // OK
    }

    private static char aChar = 'a';

    public static void main(String[] args) {
        System.out.println("aChar = " + aChar); // aChar = a
    }

}
